package org.jin.samples.model;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="exam_user_subject")
public class ExamUserSubject implements Serializable{

	private static final long serialVersionUID = -3836652996447379796L;

	@Id
	@ManyToOne(cascade = {CascadeType.DETACH, CascadeType.PERSIST, CascadeType.MERGE})
	@JoinColumn(name="user_id")
	private ExamUser user;
	
	@Id
	@ManyToOne(cascade = {CascadeType.DETACH, CascadeType.PERSIST, CascadeType.MERGE})
	@JoinColumn(name ="sub_id")
	private ExamSubject subject;

	public ExamUser getUser() {
		return user;
	}

	public void setUser(ExamUser user) {
		this.user = user;
	}

	public ExamSubject getSubject() {
		return subject;
	}

	public void setSubject(ExamSubject subject) {
		this.subject = subject;
	}
	
	
}
